<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //1.模式（结构）匹配 {}={}
    //2.属性名相同的完成赋值
    const {age,name}={name:'aa',age:18};
    console.log(age,name);
    //取别名
    const {a:sex,b:height}={a:'male',b:180};
    console.log(sex,height);
  </script>
</body>
</html>